﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using StoragePeriod.Model.FoodTesting;

namespace StoragePeriod.IDAL.FoodTesting
{
    /// <summary>
    /// 检测记录 接口
    /// </summary>
    public interface I_FoodRecord
    {
        /// <summary>
        /// 根据原料ID和检测日期获取检测记录列表
        /// </summary>
        /// <param name="eFoodRecord"></param>
        /// <returns></returns>
        DataTable GetFoodRecordListByRawIDS(E_FoodRecord eFoodRecord);

        /// <summary>
        /// 删除检测记录
        /// </summary>
        /// <param name="eFoodRecord">要删除的检测记录</param>
        /// <returns></returns>
        int Remove(E_FoodRecord eFoodRecord);

        /// <summary>
        /// 根据检测时间和原料ID 删除检测记录
        /// </summary>
        /// <param name="eFoodRecord">要删除的检测记录</param>
        /// <returns></returns>
        int RemoveByFoodTime(E_FoodRecord eFoodRecord);

        /// <summary>
        /// 根据原料ID和检测时间以及检测类型获取检测记录
        /// </summary>
        /// <param name="eFoodRecord">要获取的检测记录</param>
        /// <returns></returns>
        E_FoodRecord GetFoodRecord(E_FoodRecord eFoodRecord);

        /// <summary>
        /// 增加一条数据
        /// </summary>
        int Add(E_FoodRecord eFoodReord);

        /// <summary>
        /// 更新一条数据
        /// </summary>
        bool Update(E_FoodRecord eFoodReord);

        /// <summary>
        /// 获取最新的检测结果
        /// </summary>
        /// <param name="eFoodReord"></param>
        /// <returns>返回最新的检测结果</returns>
        E_FoodRecord GetNewFoodResult(E_FoodRecord eFoodRecord);
    }
}
